<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8" />
    <title>统一异常处理</title>
	<style>
	.text_type {
		font-family: verdana, sans-serif;
		color: #F71B1B;
		font-size: 15px;
		font-weight: bold;
		text-decoration: underline;
	}
	.table-c table{
	    border-right:1px solid #F00;
	    border-bottom:1px solid #F00;
	    text-align: center;
	}
	.table-c table td{
		border-left:1px solid #F00;
		border-top:1px solid #F00;
		color: #6517E3;
		line-height: 3;
		font-size: 16px;
	    text-align: center;}
	/* css注释：只对table td标签设置红色边框样式 */
	</style>
</head>
<body>
<h1>SpringBoot统一异常处理界面</h1>
【请求路径】：<div th:text="${url}"></div>
【错误信息】：<div th:text="${exception.message}"></div>
【异常类型】：
<div class="text_type" th:text="${exception}"></div>
<!--  -->
<div class="table-c">
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
       <td >类名</td>
       <td >文件</td>
       <td >行数</td>
       <td >方法</td>
       <td >是否是本地方法</td>
    </tr>
    <tr th:each="customer, iterStat : ${exception.stackTrace}">
      <td th:text="${customer.className}">Onions</td>
      <td th:text="${customer.fileName}">2.41</td>
      <td th:text="${customer.lineNumber}">yes</td>
      <td th:text="${customer.methodName}">yes</td>
      <td th:text="${customer.nativeMethod}">yes</td>
    </tr>
    <!--  <tr th:each="customer, iterStat : ${exception.stackTrace[1]}">
      <td th:text="${customer.className}">Onions</td>
      <td th:text="${customer.fileName}">2.41</td>
      <td th:text="${customer.lineNumber}">yes</td>
      <td th:text="${customer.methodName}">yes</td>
      <td th:text="${customer.nativeMethod}">yes</td>
    </tr>
     <tr th:each="customer, iterStat : ${exception.stackTrace[2]}">
      <td th:text="${customer.className}">Onions</td>
      <td th:text="${customer.fileName}">2.41</td>
      <td th:text="${customer.lineNumber}">yes</td>
      <td th:text="${customer.methodName}">yes</td>
      <td th:text="${customer.nativeMethod}">yes</td>
    </tr>
     <tr th:each="customer, iterStat : ${exception.stackTrace[3]}">
      <td th:text="${customer.className}">Onions</td>
      <td th:text="${customer.fileName}">2.41</td>
      <td th:text="${customer.lineNumber}">yes</td>
      <td th:text="${customer.methodName}">yes</td>
      <td th:text="${customer.nativeMethod}">yes</td>
    </tr> -->
  </table> 
  </div>
  【异常栈】：<div th:text="${exceptionStr}"></div>
</body>
</html>